<?php 
$model = new Administrator_Model_User();
$title = 'Danh sách thể loại';
	$button = '<button class="add button" name="btadd" value="btadd" type="submit"></button>';
	$button .= '<button class="edit button" name="btedit" value="btedit" type="submit"></button>';
	$button .= '<button class="delete button" name="btdelete" value="btdelete" type="submit"></button>';
	$button .= '<button class="able button" name="btable" value="btable" type="submit"></button>';
	$button .= '<button class="check button" name="btcheck" value="btcheck" type="submit"></button>';
	$button .= '<button class="option button" name="btoption" value="btoption" type="submit"></button>';
?>

<form method="post" enctype="multipart/form-data">
<div class="nav">
	<div class="navbutton">
		<?php echo $button;?>
	</div>
</div>
<div class="sheet">
	<div class="mana-title"><?php echo $title?></div>
	<div class="intro">
		<div class="form">
		
		<table class="list-item">
		<thead>
		<tr>
			<th class="stt">STT</th>
			<th class="checkbox"><input id="selectall" type="checkbox" ></th>
			<th>Tên đăng nhập</th>
			<th>Tên thật</th>
			<th>Email</th>
			<th>Điện thoại</th>
			<th>Phân quyền</th>
			<th class="action">Action</th>
			<th class="id">ID</th>
		</tr>
		</thead>
		<tbody>
<?php 
$i=1;
foreach ($model->GetAllUser() as $value) {
	$class="";if($i%2==0)$class = 'focus';
		echo '<tr class="'.$class.'">';
			echo '<td class="stt">'.$i.'</td>';
			echo '<td class="checkbox"><input id="'.$value['id'].'" type="checkbox" name="'.$value['id'].'" ></td>';
			echo '<td class="">'.$value['username'].'</td>';
			echo '<td class="">'.$value['name'].'</td>';
			echo '<td class="">'.$value['email'].'</td>';
			echo '<td class="">'.$value['phone'].'</td>';
			echo '<td class="">'.$model->GetUser_Type($value['type']).'</td>';
			echo '<td class="action"><a href="'.BASE_URL.'/administrator/user/edit?id='.$value['id'].'"><img src="'.$this->dirImg.'/edit.png"></a><a href="#" onclick="DeleteSection()"><img src="'.$this->dirImg.'/delete.png"></a></td>';
			echo '<td class="id">'.$value['id'].'</td>';
			echo '</tr>';
		$i++;
}
?>		
		</tbody>
		<tfoot></tfoot>		
		</table>
		
		</div>
	</div>
</div>
</form>